package bank;
import java.util.Scanner;
public class Trade {
	public static void main(String[] args){
		Bank.welcome();
		System.out.println("1.开户\n2.存款\n3.取款\n4.退出\n请输入1-4：");
		Scanner input=new Scanner(System.in);
		Bank b=new Bank();
		int m=input.nextInt();
		while(m<4) 
		{
			switch(m){
			case 1: System.out.println("请输入用户姓名：");
					Scanner input1=new Scanner(System.in);
					String n=input1.next();
					System.out.println("请设置账户密码：");
					Scanner input2=new Scanner(System.in);
					String p=input2.next();
					System.out.println("请输入开户金额：");
					Scanner input3=new Scanner(System.in);
					double t=input3.nextDouble();
					b=new Bank(n,p,t);
					System.out.println(b.toString());
					break;
			case 2: b.deposit();
					break;
			case 3: b.withdrawal();
					break;
			}
			System.out.println("请输入1-4：");
			Scanner input4=new Scanner(System.in);
			m=input4.nextInt();
		}
		Bank.welcomeNext();
	}
}